﻿<%@ Page Title="" Language="C#" MasterPageFile="~/管理员.Master" AutoEventWireup="true" CodeBehind="景区管理 .aspx.cs" Inherits="TicketManagement.WebForm1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
    .auto-style3 {
        position: relative;
        left: 355px;
        top: 61px;
        width: 890px;
        height: 501px;
    }
        .auto-style4 {
            height: 544px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="auto-style4"> 
        
        <div align="center" vertical-align="center"   >
         </div>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="scenicSpotNumber" DataSourceID="SqlDataSource1" AllowPaging="True" AllowSorting="True" AutoGenerateEditButton="True" HorizontalAlign="Justify" PageSize="5" CssClass="auto-style3" OnSelectedIndexChanged="GridView1_SelectedIndexChanged"   >
            <Columns>
                <asp:BoundField DataField="scenicSpotNumber" HeaderText="scenicSpotNumber" ReadOnly="True" SortExpression="scenicSpotNumber" />
                <asp:BoundField DataField="scenicSpotName" HeaderText="scenicSpotName" SortExpression="scenicSpotName" />
                <asp:BoundField DataField="telephone" HeaderText="telephone" SortExpression="telephone" />
                <asp:BoundField DataField="address" HeaderText="address" SortExpression="address" />
                <asp:BoundField DataField="level" HeaderText="level" SortExpression="level" />
            </Columns>
            <RowStyle HorizontalAlign="Center" />
        </asp:GridView>
           
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ticket_management_systemConnectionString %>" ProviderName="<%$ ConnectionStrings:ticket_management_systemConnectionString.ProviderName %>" SelectCommand="SELECT scenicSpotNumber, scenicSpotName, telephone, address,level 
FROM scenicspot,scenicspotlevel where scenicSpotLevel_id=number" ConflictDetection="CompareAllValues" DeleteCommand="DELETE FROM [scenicspot] WHERE [scenicSpotNumber] = ? AND [scenicSpotName] = ? AND [telephone] = ? AND [address] = ? AND (([scenicSpotLevel_id] = ?) OR ([scenicSpotLevel_id] IS NULL AND ? IS NULL))" InsertCommand="INSERT INTO [scenicspot] ([scenicSpotNumber], [scenicSpotName], [telephone], [address], [scenicSpotLevel_id]) VALUES (?, ?, ?, ?, ?)" OldValuesParameterFormatString="original_{0}" UpdateCommand="UPDATE scenicspot SET scenicSpotName = ?, telephone = ?, address = ?, scenicSpotLevel_id = ? WHERE scenicSpotNumber = ? AND scenicSpotName = ? AND telephone = ? AND address = ? AND ((scenicSpotLevel_id = ?) OR (scenicSpotLevel_id IS NULL AND ? IS NULL))">
            <DeleteParameters>
                <asp:Parameter Name="original_scenicSpotNumber" Type="Int32" />
                <asp:Parameter Name="original_scenicSpotName" Type="String" />
                <asp:Parameter Name="original_telephone" Type="Int64" />
                <asp:Parameter Name="original_address" Type="String" />
                <asp:Parameter Name="original_scenicSpotLevel_id" Type="Int32" />
                <asp:Parameter Name="original_scenicSpotLevel_id" Type="Int32" />
            </DeleteParameters>
            <InsertParameters>
                <asp:Parameter Name="scenicSpotNumber" Type="Int32" />
                <asp:Parameter Name="scenicSpotName" Type="String" />
                <asp:Parameter Name="telephone" Type="Int64" />
                <asp:Parameter Name="address" Type="String" />
                <asp:Parameter Name="scenicSpotLevel_id" Type="Int32" />
            </InsertParameters>
            <UpdateParameters>
                <asp:Parameter Name="scenicSpotName" Type="String" />
                <asp:Parameter Name="telephone" Type="Int64" />
                <asp:Parameter Name="address" Type="String" />
                <asp:Parameter Name="scenicSpotLevel_id" Type="Int32" />
                <asp:Parameter Name="original_scenicSpotNumber" Type="Int32" />
                <asp:Parameter Name="original_scenicSpotName" Type="String" />
                <asp:Parameter Name="original_telephone" Type="Int64" />
                <asp:Parameter Name="original_address" Type="String" />
                <asp:Parameter Name="original_scenicSpotLevel_id" Type="Int32" />
                <asp:Parameter Name="original_scenicSpotLevel_id" Type="Int32" />
            </UpdateParameters>
        </asp:SqlDataSource>

        </div>
</asp:Content>
